<#assign ctx = request.contextPath/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>人事管理系统 ——部门管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link href="${ctx}/css/css.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript" src="${ctx}/js/jquery-1.11.0.js"></script>
	<script type="text/javascript">
		function move(row) {
			row.style.backgroundColor = "#ebf0f5";
			row.style.cursor = "pointer";
		}
		function out(row) {
			row.style.backgroundColor = "#ffffff";
		}
		/** 生成Excel文件 */
		function excelFn(){
			document.location = "${ctx}/admin/user/exportUser";
		};
		
	</script>
</head>
<body>
	<!-- 导航 -->
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
	  <tr><td height="10"></td></tr>
	  <tr>
	    <td width="15" height="32"><img src="${ctx}/images/main_locleft.gif" width="15" height="32"></td>
		<td class="main_locbg font2"><img src="${ctx}/images/pointer.gif">&nbsp;&nbsp;&nbsp;当前位置：部门管理 &gt; 部门查询</td>
		<td width="15" height="32"><img src="${ctx}/images/main_locright.gif" width="15" height="32"></td>
	  </tr>
	</table>
	
	<table width="100%" height="90%" border="0" cellpadding="5" cellspacing="0" class="main_tabbor">
	  <!-- 查询区  -->
	  <tr valign="top">
	    <td height="30">
		  <table width="100%" border="0" cellpadding="0" cellspacing="10" class="main_tab">
		    <tr>
			  <td class="fftd">
			  	<form name="empform" method="post" id="empform" action="${ctx}/admin/dept/deptList" theme="simple">
				    <table width="100%" border="0" cellpadding="0" cellspacing="0">
					  <tr>
					    <td class="font3">
					    	姓名：
						    	<input type="text" value="${backDept.name!''}" name="name"/>					    	
						        评论：
						    	<input type="text" value="${backDept.remark!''}" name="remark"/>

					    </td>
					  </tr>
					  <tr>
					    <td class="font3">
					    	<input type="submit" value="搜索"/>
					    	<input type="button" value="导出EXCEL" onclick="excelFn();"/>
					    	<a href="${ctx}/admin/dept/toImportUser">导入EXCEL</a>					    	
					    </td>
					  </tr>
					</table>
				</form>
			  </td>
			</tr>
		  </table>
		</td>
	  </tr>
	  
	  <!-- 数据展示区 -->
	  <tr valign="top">
	    <td height="20">
	    <font style="color: red;">${tip!''}</font>
		  <table width="100%" border="1" cellpadding="5" cellspacing="0" style="border:#c2c6cc 1px solid; border-collapse:collapse;">
		    <tr class="main_trbg_tit">
			  <td>编号</td>
			  <td>部门名称</td>
			  <td>部门评论</td>
			  <td colspan="2" align="center">操作</td>
			</tr>
			<#list pageBean.list as dept>
				<tr class="main_trbg" onMouseOver="move(this);" onMouseOut="out(this);">
				  <td>${dept_index}</td>
				  <td>${dept.name!''}</td>
				  <td>${dept.remark!''}</td>
				  <td align="center" width="40px;"><a href="${ctx}/admin/dept/toUpdateDept?id=${dept.id}">
						<img title="修改" src="${ctx}/images/update.gif"/>
						</a>
				  </td>
				  <td align="center"  width="40px;"><a onclick="delDept(${dept.id})" href="javaScript:void(0);">
						<img title="删除" src="${ctx}/images/delete.gif"/>
						</a>
				  </td>
				  <script type="text/javascript">
				  	function delDept(id){
				  		var v = confirm("你确定要删除吗？");
				  		if(v){
				  			window.location.href = "${ctx}/admin/dept/deleteDept?id="+id;
				  		}
				  	}
				  </script>
				</tr>
			</#list>			
		  </table>
		</td>
	  </tr>
	  <!-- 分页标签 -->
	  <tr valign="top"><td align="center" class="font3">
	  	<#if pageBean.recordCount??>
	    <#import "pager.html" as page>
	    <@page.pager pageIndex=pageBean.pageIndex pageSize=pageBean.pageSize recordCount=pageBean.recordCount toURL="${ctx}/admin/dept/deptList"/>
 		</#if>
	  </td></tr>
	</table>
	<div style="height:10px;"></div>
	
</body>
</html>